/*
 * @Author: your name
 * @Date: 2021-12-19 21:16:49
 * @LastEditTime: 2021-12-19 21:27:16
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \json-serveg:\桌面2\50htmljs\cards\script.js
 */
const panels = document.querySelectorAll('.panel')
// console.log(panels)

panels.forEach(panel=>{
    panel.addEventListener('click',function(){
        // console.log(panel)
        removeActiveClasses()
         panel.classList.add('active')
    })
})

function removeActiveClasses(){
    panels.forEach(panel=>{
        panel.classList.remove('active')
    })
}
